package eu.vranckaert.workRegistrationWidget.dao;

import android.content.Context;
import android.location.Location;
import com.google.inject.ImplementedBy;
import eu.vranckaert.workRegistrationWidget.dao.impl.TimeRegDaoImpl;
import eu.vranckaert.workRegistrationWidget.dao.util.DaoHelper;
import eu.vranckaert.workRegistrationWidget.domain.TimeRegistration;

import java.util.List;

@ImplementedBy(TimeRegDaoImpl.class)
public interface TimeRegDao extends DaoHelper {
    TimeRegistration findLatestRegistration(Context context);

    TimeRegistration saveOrUpdate(Context context, TimeRegistration timeRegistration);

    List<TimeRegistration> findAll(Context context);

    void removeAll(Context context);

    void delete(Context context, TimeRegistration timeRegistration);

    void updateWithLocation(Context context, TimeRegistration timeRegistration, Location location, boolean startLocation);
}
